package tom.oauth2;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

/**
 * 访问非授权url: http://localhost:8080/hi 正常返回
 * 访问授权url: http://localhost:8080/order 提示未授权
 * 注意level=debug日志
 * 密码模式:
 *  获取access_token: client2是password类型授权
 * 		http://localhost:8080/oauth/token?username=user1&password=123&grant_type=password&scope=select&client_id=client2&client_secret=123
 * 	返回json包含access_token
 * 	再次访问	: http://localhost:8080/order?access_token=9682bc84-af95-43aa-8682-86405dab1198
 *
 * 客户端模式:
 *	http://localhost:8080/oauth/token?grant_type=client_credentials&scope=select&client_id=client1&client_secret=123
 *  返回json中包含access_token
 *
 * @author ZHUFEIFEI
 */
@SpringBootApplication
public class Oauth2demo01Application {

	public static void main(String[] args) {
		SpringApplication.run(Oauth2demo01Application.class, args);
	}

}

